import type { IHttpContext } from "boot/interface"
import { Controller, Inject, Get, Post, RequestBody, PathVariable, Response } from "boot/decorator"
import UserService from "../service/UserService"

@Controller("/upload")
export default class UploadController {
  @Inject()
  userService: UserService

  @Post("/")
  async addUser(ctx: IHttpContext) {
    console.log(`ctx.request.files = `, ctx.request.files)
    console.log(`ctx.request.body = `, ctx.request.body)
    ctx.body = ctx.request.files
  }
}
